package net.hzlj.platform.enterprise.config;

import net.hzlj.platform.enterprise.common.Constant;

/**
 * @Description: 对于网络请求接口的所有静态配置
 * @Author: Jason Zhang
 * @Date: 2014年10月18日 上午10:51:50
 */
public class HttpConfig {

	public static int COLUMN_BASE = 0;

	public static String SOCKET_IP = "211.143.45.231";
	public static int SOCKET_PORT = 20999;

	public static String HTTP = "http://";
	public static String URL_SPLITTER = "/";
	public static String URL_HOST_PLITTER = ":";

	public static String HOST = "211.143.45.231";
	public static String PORT = "7088";
	public static String URL_PROJECT_NAME = "rl";

	static {
		if (Constant.DEBUG){
			//http
			HOST = "192.168.5.111";
			PORT = "3330";
			URL_PROJECT_NAME = "rl";

			//Socket
			SOCKET_IP = "192.168.5.111";
			SOCKET_PORT = 20999;
		}
	}

	public static String URL_API_HOST = HTTP + HOST + URL_HOST_PLITTER + PORT + URL_SPLITTER + URL_PROJECT_NAME;

	public static void setHost(String host){
		HOST = host;
		URL_API_HOST = HTTP + HOST + URL_HOST_PLITTER + PORT + URL_SPLITTER + URL_PROJECT_NAME;
	}

	public static void setPort(String port){
		PORT = port;
		URL_API_HOST = HTTP + HOST + URL_HOST_PLITTER + PORT + URL_SPLITTER + URL_PROJECT_NAME;
	}

	/***
	 * 个推绑定服务端
	 */
	public static String POST_URL_CLIENT_SAVE = "/videoAction/saveClientId.action";

	/***
	 * 个推解绑服务端
	 */
	public static String POST_URL_CLIENT_REMOVE = "/videoAction/removeClientId.action";

	/***
	 * 用户登录方法，此方法有两个参数，登录名、密码
	 */
	public static String POST_URL_LOGIN = "/user/login";

	/***
	 * 修改密码
	 */
	public static String POST_URL_CHANGE_PASSWORD = "/user/changePassword";

	/***
	 * 获取网络时间
	 */
	public static String POST_URL_NETWORK_TIME = "/android/faceVoice/getNetWorkTime.action";

	/***
	 * 电话汇报
	 */
	public static String POST_URL_TELEPHONE_REPORTING = "/android/telephoneReporting.do";


	/***
	 * 获取指定人员的详情
	 */
	public static String POST_URL_SELECT_RYMC_BY_ID = "/user/getUserDetail";


	/***
	 * 添加视频通信记录
	 */
	public static String POST_URL_INSERT_VIDEO_LOG= "/android/videoLog/insertVideoLog.action";

	/***
	 * 添加视频通信记录图片
	 */
	public static String POST_URL_VIDEO_LOG_UPLOAD = "/android/videoLogAdjunctUpload.do";


	/***
	 * 可查询系统平台内社区服刑人员的基本信息。
	 （姓名，性别，身份证，手机号码 ，组织机构，入矫日期，解矫日期）
	 */
	public static String POST_URL_MANAGER_GETRYMCLIST = "/android/manager/getRymcList.action";

	/***
	 * 查看矫正人员详情
	 */
	public static String POST_URL_MANAGER_GETRYMCDETAIL = "/android/manager/getRymcDetail.action";

	public static String POST_URL_LIFE_TIME = "app=life.time";

	/**
	 * 获取题库
	 */
	public static String POST_URL_QUESTION_STATUS = "/android/question/question_getrymcList.action";

	/***
	 * 问卷调查-问题列表
	 */
	public static String POST_URL_QUESTION_LIST = "/android/question/question_answerList.action";

	/***
	 * 问卷调查-答案列表
	 */
	public static String POST_URL_QUESTION_ANSWER = "/android/question/question_getRymcAnswer.action";

	/***
	 * 问卷调查-提交答案
	 */
	public static String POST_URL_QUESTION_SUBMIT = "/android/question/question_saveRymcAnswer.action";

	/***
	 * 定向分析-问题列表
	 */
	public static String POST_URL_ANALYSIS_LIST = "/android/question/question_analysisList.action";

	/***
	 * 定向分析-答案列表
	 */
	public static String POST_URL_ANALYSIS_ANSWER = "/android/question/question_getRymcAnalysis.action";

	/***
	 * 定向分析-提交答案
	 */
	public static String POST_URL_ANALYSIS_SUBMIT = "/android/question/question_saveRymcAnalysis.action";

	/***
	 * 心理问卷前调查-提交答案
	 */
	public static String POST_URL_MENTAL_SUBMIT = "/android/question/question_saveRymcPreXlwj.action";

	/***
	 * 获取心理问卷答案
	 */
	public static String POST_URL_MENTAL_ANSWER= "/android/question/question_getRymcXlwj.action";


	/***
	 * 提交心理问卷答案
	 */
	public static String POST_URL_MENTAL_ANSWER_SUBMIT= "/android/question/question_saveRymcXlwj.action";

	public static class Type {
		public static int LOGIN = COLUMN_BASE++;
		public static int CHANGE_PASSWORD = COLUMN_BASE++;
		public static int NETWORK_TIME = COLUMN_BASE++;
		public static int TELEPHONE_REPORTING = COLUMN_BASE++;
		public static int SELECT_RYMC_BY_ID = COLUMN_BASE++;
		public static int INSERT_VIDEO_LOG = COLUMN_BASE++;
		public static int VIDEO_LOG_UPLOAD  = COLUMN_BASE++;
		public static int FILE_DOWNLOAD = COLUMN_BASE++;

		public static int QUESTION_STATUS = COLUMN_BASE++;
		public static int QUESTION_LIST = COLUMN_BASE++;
		public static int QUESTION_ANSWER = COLUMN_BASE++;
		public static int QUESTION_SUBMIT = COLUMN_BASE++;
		public static int ANALYSIS_LIST = COLUMN_BASE++;
		public static int ANALYSIS_ANSWER = COLUMN_BASE++;
		public static int ANALYSIS_SUBMIT = COLUMN_BASE++;
		public static int MENTAL_SUBMIT = COLUMN_BASE++;
	}
}
